package cn.hchaojie.camp.day04;

/**
 * 成员变量有默认的初始值
 * 
 * @author hchaojie
 *
 */
public class Employee {
	private String name;
	private int age;
	private double salary;
	private Department d;
	
	public Employee(String name, int age, double salary) {
		super();
		this.name = name;
		this.age = age;
		this.salary = salary;
	}

	public Employee() {
	}
	
	public Employee(String name, int age) {
		this.name = name;
		this.age = age;
	}
	
	// 初始化，通过get和set方法来设置和取值
	
	@Override
	public String toString() {
		return "Employee [name=" + name + ", age=" + age + ", salary=" + salary + "]";
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getAge() {
		return age;
	}

	public void setAge(int age) {
		this.age = age;
	}

	public double getSalary() {
		return salary;
	}

	public void setSalary(double salary) {
		this.salary = salary;
	}
}
